/*******************************************************************************
 * Copyright (c) 2009 David Harrison.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl-3.0.html 
 *  
 * Contributors:
 *     David Harrison - initial API and implementation
 ******************************************************************************/
package com.sfs.postcodes.stripes;

/**
 *
 * @author David Harrison
 * 3 May 2008
 * 
 */

import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.UrlBinding;


@UrlBinding("/web/webservices")
public class WebservicesActionBean extends BaseActionBean {
            
    private String WEBSERVICES = "webservices.jsp";
            
    public String getXmlrpcUrl() {               
        return getApplicationUrl() + "xmlrpc";
    }    
    public String getSoapUrl() {               
        return getApplicationUrl() + "services/PostcodeService";
    }
    public String getWsdlUrl() {               
        return getSoapUrl() + "?wsdl";
    }
    public String getXsdUrl() {               
        return getSoapUrl() + "?xsd";
    }
    
    @DefaultHandler
    public Resolution details() {  
        Resolution response = new ForwardResolution(getView(WEBSERVICES));
        
        return response;
    }
}
